define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, undefined, Frontend, Form, Template) {

    var Controller = {
        docard: function () {
            $("title").html(Config.title);
            if (Config.checkstatus == 1) {
                $("#username").attr("disabled", true);
                $("#idnum").attr("disabled", true);

            }

            Form.api.bindevent($("form[role=form]"), function (data, ret) {

                if (ret.result == 0) {
                    Toastr.success(ret.msg);
                    location.reload();
                } else {
                    Toastr.error(ret.msg);
                }

                return false;
            }, function (success, error) {
                //错误提示码
                //   return false;

            }, function () {

                //已验证的身份证禁止提交表单
                if (Config.checkstatus == 1) {
                    return false;
                }

            });

        },

    };
    return Controller;
});